package com.mall.bargain.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mall.bargain.mapper.GoodsMapper;
import com.mall.bargain.service.GoodsService;
import com.mall.bargain.vo.VoTbGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 * @date 2021/7/20 15:06
 */
@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private GoodsMapper goodsMapper;

    /**
     * @author Administrator
     * 查询goods表
     * */
    @Override
    public PageInfo findGoodsAll(VoTbGoods goods,int page,int size) {
        PageHelper.startPage(page,size);
        List<VoTbGoods> goodsAll = goodsMapper.findGoodsAll(goods);
        return new PageInfo(goodsAll);
    }


}
